package xyz.bali16.application.model.menu;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@Data
@ApiModel("添加菜单参数")
public class MenuAddParam {

    /**
     * 菜单名称
     */
    @ApiModelProperty(name = "title", value = "菜单名称", required = true)
    @NotEmpty(message = "菜单名称不能为空")
    private String menuName;

    /**
     * 菜单描述
     */
    @ApiModelProperty(name = "description", value = "菜单描述")
    private String description;

    /**
     * 组件名称
     */
    @ApiModelProperty(name = "component", value = "组件名称")
    private String component;

    /**
     * 路径地址
     */
    @ApiModelProperty(name = "path", value = "路径地址")
    private String url;

    /**
     * 权限标识, 多个可用逗号分隔
     */
    @ApiModelProperty(name = "permissions", value = "权限标识")
    private String permissions;

    /**
     * 父菜单id
     */
    @ApiModelProperty(name = "parentId", value = "父菜单id, 如果为顶级菜单, 则设置为空")
    private Long parentId;

    /**
     * 类型(0: 目录、1: 菜单、2: 权限)
     */
    @ApiModelProperty(name = "type", value = "菜单类型", required = true)
    @NotNull(message = "类型不能为空")
    private Integer type;

    /**
     * 排序，数字越小越靠前
     */
    @ApiModelProperty(name = "orderNum", value = "排序", required = true)
    @NotNull(message = "排序不能为空")
    private Integer orderNum;

    /**
     * 图标
     */
    @ApiModelProperty(name = "icon", value = "图标")
    private String icon;

    /**
     * 菜单状态（1启用, 0停用）
     */
    @ApiModelProperty(name = "status", value = "菜单状态", required = false)
    @NotNull(message = "菜单状态不能为空")
    private Integer status;


}
